(function(n){n.loadScroll={defaults:{duration:500,debug:!1,autoTrigger:!0,autoTriggerUntil:!1,loadingHtml:"Loading...<\/small>",loadingFunction:!1,padding:0,nextSelector:"a:last",contentSelector:"",pagingSelector:"",callback:!1}};n.fn.loadScroll=function(t,i){function f(){e=r.filter(function(){var t=u.scrollTop(),r=u.height(),i=n(this).offset().top,f=n(this).height();return i+f>=t&&i<=t+r});o=e.trigger("loadScroll");r=r.not(o)}var s=typeof i=="function"?{callback:i}:i,h=n.extend({},n.loadScroll.defaults,s,{}),u=n(window),r=this,e,o;r.one("loadScroll",function(){if(this.getAttribute("data-url")){let i=this.getAttribute("data-url"),t=this;n.ajax({method:"GET",url:i,headers:{"token-header":this.getAttribute("data-token")},beforeSend:function(){}}).done(function(i){n(t).html(i).fadeIn("slow");t.removeAttribute("data-url")}).fail(function(){n(t).html("").fadeIn("slow")})}});u.scroll(function(){f()});n(window).focus(function(){f()});n(function(){document.hidden||f()})}})(jQuery);